SSRS 2008: how to show an empty chart with legend and x and y axis when no data available

Hi,
I am using SSRS 2008, I generated one chart in report designer with the data from Analysis Services (Cube).
According to the dataset, there is no data returned when I run the query. so when I preview the chart, there is nothing but "no data available" showing on the chart.
Here I want to know is there any possible to show an empty chart with legend and x and y axis?
If it is possible, can you tell me how can I make it?
Best Regards.
Connie Zhu

Hi,
When there is no data, the chart displays the message "no data available". But using a little work around, you can display an empty chart.
Please find the below steps given to achieve this
1. Create a new dataset using TSQL to return 1 row of data having the category field and value field set to 0. Add the fields that are necessary for the category fields, series fields and datafields.
   A simple example would be like
   SELECT 'abc' as Category, 0 as Amount
2. Add a new chart, set the category field to 'Category' and set the data field to Amount from above dataset created in step 1.
3. In the new chart, right click the category axis and select axis properties, Click on the labels tab, check on
'Hide axis labels' and then click ok
4. Now set the Visibility property of both the charts depending on the rows returned from your main dataset
   a. click on your main chart and set its Hidden property to :
=iif(CountRows("MainDataSet"),false,true) 
   b. click on the new blank chart added and set its Hidden proprety to (the opposite) :
=iif(CountRows("MainDataSet"),true,false) 
   Note : Please change the dataset name in above expression "MainDataset" to the name of your chart's dataset
5. Resize the new chart to the same size as your main chart, then position the new chart on the place as the main chart.
   (Note : You can set the position of new chart to be same by copying the location property from the main chart) 
6. Now run and observe the result. When there are no rows returned by your main dataset, the new chart (the blank chart) should be displayed.
I've added a working sample of this kind of a report
here.
Hope this helps. Please feel free to discuss if you have any questions.
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
BH

Similar Messages

  • Printing chart with legend type "DATATABLE" only shows graph.

    Hi All,
    We are running BI 7.01, distributing webtemplates via the Portal.
    When a report contains a chart with Legend Type "DATATABLE", the table under the graph does not get printed when creating a PdF print. The report output shows the data fine. How can I get these DATATABLE legends to become visible when printing in PDF?
    Thanks,
    Eduard

    Thanks for the quick reply.
    Isn't this an Adobe/Portal related phenomenon? The 3.5 version of the same report works fine and it uses the same IGS. I thought the IGS was only needed for rendering the graph to display on screen, but is it also needed to create a PDF? I figured that once the output is on screen, the IGS's work is done. Or am I totally off here?
    Thanks,
    Eduard

  • How to show all view tab (Main Report and all Sub Report) in Visual FoxPro 9

    I use ActiveX from Crystal Report Developer XI for viewer in Visual FoxPro 9 and I already know how to show Main Report by using command:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Inside the MyReport.rpt there is two subreport name :
    1. MySubReport1
    2. MySubReport2
    My Question is :
    How to show all view tab (Main Report and all Sub Report) at the 1st time we call ViewReport?
    I try to using command :
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptSub=oRptOpen.OpenSubreport("MySubReport1")
    oRptSub=oRptOpen.OpenSubreport("MySubReport2")
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    but only show Main Report (view tab name : Preview)?
    Did I miss any command before I call oRptView.ViewReport?

    Your right, there is only one tab to view the report.
    To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
    http://diamond.businessobjects.com/robhorne</a>

  • How to create a chart with x and y input arrays

    I am trying to create a chart that receives chunks of data from a while loop.  I know how to create a chart in order to append new data points to those points already in the display, but a regular chart doesn't let me specify the x axis data points.  Is there a way to create a chart with x and y array inputs?
    Thanx,
    Tom

    It's called an XY Graph. If you need an XY graph to behave like a chart, look at the shipping example called XY Chart.

  • How to create an commerce chart of sizes and prices, etc?

    How to create an commerce chart of sizes and prices, etc?

    Hi,
    Andreas is right, we have many ways to deploy Windows 8.1 like OEM.
    You can also try the ADK:
    Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1
    http://www.microsoft.com/en-hk/download/details.aspx?id=39982
    The Windows ADK enables two key scenarios: Windows deployment and Windows assessment.
    Windows Deployment is for OEMs and IT professionals who customize and automate the large-scale installation of Windows on a factory floor or across an organization.
    Kate Li
    TechNet Community Support

  • Bubble Chart with legend changes axis dimensions according to labels length

    I have a Bubble Chart with legend on the right. Data are by series and  the series are set  dynamically with a  drop down combo which replace the content of each series from time to time.  Every time the series changes, also the name of the series changes and the legend on the right  shows the new series names. The problem is that also the x axis dimension changes according to the new labels size, so the bubble chart changes its axis width in relation to the labels length in the legend. Is its possible to make somehow the bubble chart axis of a fixed lenght?
    Xcelsius 2008, SP4, Windows XP
    Thanks in advance

    Hi Matt,
    I just got a chance to try out your suggestions, and the
    chart that is right in the main application renders the labels
    fine, but the exact same code loaded in as a module doesn't. And it
    never does, not even if the scale changes. Do you know why that
    would be?
    Mukul

  • Pie Chart with Legend

    Hey Experts,
    I have a small issue but cannot seem to find the solution. I have a pie chart with legends which I want to show side by side (horizontally). First pie chart and then legends. My requirement is that when the window is resized, the pie chart should also resize. I am able to show the chart and legends horizontally but when the legends list is long, the pie chart is always aligned in the center vertically. I tried setting all properties such as verticalAlign = "top", verticalCenter = "false", tried putting pie chart and legends in a separate VBox but nothing seems to work. Below is the code snippet.
    I believe others would have faced this problem. Can someone help?
    <mx:HBox width="100%" height="100%" verticalAlign="top" verticalCenter="false">
         <mx:VBox width="100%" verticalAlign="top" verticalCenter="false">
              <mx:PieChart id="pieChart" width="100%" height="100%" showDataTips="true" minWidth="200" minHeight="200" verticalCenter="false"/>
         </mx:VBox>
         <mx:VBox width="100%" verticalAlign="top" verticalCenter="false">
              <mx:Legend width="100%" height="100%" dataProvider="{pieChart}"/>
         </mx:VBox>
    </mx:HBox>

    Hi Dajji,
    Here is the code which resolves the problem...
    Note: In the code below I have removed the percentage width and height for PieChart.....that resolves the problem.....but the thing here is as you resize
    your browser window the piechart width and height will not change accordingly...? Do you need PieChart to change its dimensions as your browser window
    resizes...???
    However if you specify width="100%" and height="100%" for PieChart you never gonna acheive the PieChart to be vertically alined to top.....why because
    as you specified width="100%" and height="100%" for PieChart it occupies the total dimensions of the VBox but the actual visible portion dimensions are
    less... because within the VBox you also have the legends so Flex will assign the sizes proportionately....for PieChart and Legends..
    Hope you got my point...So you should remove the width="100%" and height="100%" for PieChart then you can acheive what you needed...
    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the PieChart control. -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="100%" width="100%">
        <mx:Script>
            <![CDATA[         
            import mx.collections.ArrayCollection;
            [Bindable]
            private var medalsAC:ArrayCollection = new ArrayCollection( [
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);
            private function displayGold(data:Object, field:String, index:Number, percentValue:Number):String {
                var temp:String= (" " + percentValue).substr(0,6);
                return data.Country + ": " + '\n' + "Total Gold: " + data.Gold + '\n' + temp + "%";
            ]]>
        </mx:Script>
        <mx:Panel title="Olympics 2004 Medals Tally Panel" height="100%" width="100%" layout="horizontal" verticalAlign="top">
               <mx:VBox verticalAlign="top" height="100%" width="100%">
                 <mx:PieChart id="chart"
                     showDataTips="true"
                     dataProvider="{medalsAC}">         
                     <mx:series>
                         <mx:PieSeries
                             nameField="Country"
                             field="Gold"
                             labelFunction="displayGold">
                         </mx:PieSeries>
                     </mx:series>
                 </mx:PieChart> 
               </mx:VBox>                 
             <mx:Legend dataProvider="{chart}"/>
        </mx:Panel>
    </mx:Application>
    Thanks,
    Bhasker Chari

  • CRXIR2 - A chart with horizontal and vertical lines?

    Good morning,
    Is it possible to create a chart with horizontal and vertical lines?
    I have a chart where the Y-Axis show the percentage and the X-Axis shows a timeline.
    The horizontal line shows the percentage for the points in time.
    Now I would like to mark some special points in time on the X-Axis with a straight vertical line.
    Is there a way to do that?
    Thank you very much in advance
    Christoph

    Hello Usama,
    unfortunatelly I couldn't find that that feature in the basic chart features.
    Also the webpage www.3DGraphics.com doesn't exist and I had no luck to google for 3DGraphics.
    It's a little strange, that it seems to be possible to draw one additional horizontal line with the basic features, but no additional vertical line.
    for example.
    If the main chart would be y=3x+1
    It seems to be possible to draw e.g. y=5
    But I see no chance to draw x=5
    In addition, to make it a little more complicated, I would need to have that dynamically, based on the values of a sql-statement.
    thx
    Christoph

  • When I add stuff to my computer google calendar, it syncs with iphone and ipad, but when I add stuff to ipad or iphone, it doesn't sync. How do I fix this

    When I add stuff to my computer google calendar, it syncs with iphone and ipad, but when I add stuff to ipad or iphone, it doesn't sync with the other calendars. How do I fix this?

    I have iPad 2 and I am having same problem since I updated to iOS 5. All we can do it is rotate it from computer

  • I am using Ubuntu; iTunes installed via wine is not working properly. So how should i sync my apps on iTunes and device?          When will iTunes come to Ubuntu

    I am using Ubuntu; iTunes installed via wine is not working properly. So how should i sync my apps on iTunes and device?
    When will iTunes come to Ubuntu?

    See:
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.org/kb/Firefox+crashes
    If you have submitted crash reports then please post the IDs of one or more recent crash reports that have this format:
    *bp-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.
    *You can open the <b>about:crashes</b> page via the location bar, like you open a website, or open this page via "Help > Troubleshooting Information".
    See:
    *http://kb.mozillazine.org/Mozilla_Crash_Reporter
    *https://support.mozilla.org/kb/Mozilla+Crash+Reporter

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • HT201274 i tried to erase all content and reset settings from the device option.it is taking too long and its been 15 hours but not yet done.its showing a skeleton sigh with buffering and sometimes flipping to apple sign.

    i tried to erase all content and reset settings from the device option.it is taking too long and its been 15 hours but not yet done.its showing a skeleton sigh with buffering and sometimes flipping to apple sign.

    nabidhadi wrote:
    .its showing a skeleton sigh with buffering and sometimes flipping to apple sign.
    You iPod has been jail broken.  Unfortunately you are on your own here. I can offer that you need to find out which method and software was used to JB.
    Good luck...you're gonna need it....

  • Don't know how to sync music on mac with iphone and ipod

    don't know how to sync music on mac with iphone and ipod
    need to also know how to recover original library of ipod as it seems as though
    it has now sync'ed with iphone & lost all my music

    Start HERE

  • How can i unlock the service with AT&T or other carrier? when i was in overseas ?how much does it cost to unlock?

    how can i unlock the service with AT&T or other carrier? when i was in overseas ?how much does it cost to unlock?

    The only way to unlock a locked device is through the carrier. If it is locked to AT&T, you will have to contact them to get it unlocked.
    Cheers,
    GB

  • HT4910 sold my ipad today. the concern is how to access all info stored in cloud and if possible eventualy merge data into new andriod tablet. Thanks all of you who respond.

    sold my ipad today. the concern is how to access all info stored in cloud and if possible eventualy merge data into new andriod tablet. Thanks all of you who respond.

    >
    <IfModule mod_weblogic.c>
    WebLogicCluster 127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7003,127.0.0.1:7103,127.0.0.1:7104
    MatchExpression /app1
    </IfModule>
    <Location /weblogic>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
    DebugConfigInfo ON
    PathTrim /weblogic
    </Location>
    <IfModule mod_weblogic.c>
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    MatchExpression /app2
    </IfModule>
    <Location /weblogic>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    DebugConfigInfo ON
    PathTrim /weblogic
    </Location>
    >
    This configuration is weird little bit. There is MatchExpression /app1 and MatchExpression /app2 and at the same time two <Location /weblogic> sections. Are you sure you understand what that configuration stands for?
    Try something like this ...
    <Location /app1>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
    DebugConfigInfo ON
    </Location>
    <Location /app2>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    DebugConfigInfo ON
    </Location>
    where /app1 and /app2 are contexts of your weblogic applications.
    http://download.oracle.com/docs/cd/E11035_01/wls100/plugins/apache.html
    http://httpd.apache.org/docs/2.0/mod/core.html#location

Maybe you are looking for

  • New for Me but....

    My daugher gave me her old Ipod (OLD...very) after she wiped off all her songs.  So I plugged it into my fairly new PC, lots of free hard drive space, and then downloaded ITunes.  Ever since I did, my system has been going nuts.  I open up ITunes and

  • ITunes hac encountered a problem and needs to close.

    I keep getting "iTunes has encountered a problem and needs to close" I keep sending the error but it doesn't help at all. When I tried to download iTunes 7.5 it gave me the error message that I don't have QuickTime, but I do. And every time I try to

  • How to reference a field statically in a program?

    Hi Everyone, Can any one explain me how to reference a field statically. As the error on Extended program check is as follows: Field FLAG is not referenced statically in the program    where as the particular field has been defined as below in the pr

  • Powerview print all content at a time

    while printing PowerView table, I am facing one problem i.e. If a table having much data (more than screen) that we have to scroll down, then I am not able to print it in one shot. As in PowerPivot, we have Excel sheet, it can grow as per the data. S

  • OSPF LSA with DC bit set

    Hello, If an LSA is received by an OSPF router which is not Demand Circuit capable, will that LSA be installed in link state database? Thanks