- Welcome, Guest. Please Login or Register
MindFusion  
  We are soon releasing MindFusion.JavaScript pack. Initial version includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are the beta version and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Pages: 1 2  Send Topic Print  
The empty DataRange can NOT be exported to PDF
Read 8294 times

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
The empty DataRange can NOT be exported to PDF
May 14th, 2013 at 10:44am
 
The empty DataRange can NOT be exported to PDF

any solution??
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #1 - May 14th, 2013 at 12:09pm
 
Hi,

Currently empty data ranges are not displayed in reports. You can set DataRange.Repeat to 1 for the data range to force it to have one instance.

Let me know if this helps.

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #2 - May 15th, 2013 at 4:25am
 
but I wanna to control the datarange to display or not by condition.

any solution?
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #3 - May 15th, 2013 at 6:33am
 
Try setting DataRange.Repeat to 1 for the empty data ranges that you want to be visible. Make sure that DataRange.DataSource is set to null in this case. You can also set Repeat in the QueryDetails event handler for nested data ranges. In this case set QueryDetailsEventArgs.Details to null.

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #4 - May 15th, 2013 at 7:43am
 
Meppy wrote on May 15th, 2013 at 6:33am:
Try setting DataRange.Repeat to 1 for the empty data ranges that you want to be visible. Make sure that DataRange.DataSource is set to null in this case. You can also set Repeat in the QueryDetails event handler for nested data ranges. In this case set QueryDetailsEventArgs.Details to null.

Regards,
Meppy


Hi,

This still display the DataRange, but I wanna to control the DataRange invisible.

any solution?
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #5 - May 15th, 2013 at 9:12am
 
Can you provide me with a sample with your report and specify which data ranges in this report you want to show or hide?

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #6 - May 15th, 2013 at 10:01am
 
Meppy wrote on May 15th, 2013 at 9:12am:
Can you provide me with a sample with your report and specify which data ranges in this report you want to show or hide?

Regards,
Meppy


Hi, the xaml sample code below:
Code (HTML):
            <r:DataRange DataSource="{Binding QuestionTable}" Size="100%,100">
                <r:DataRange.ItemTemplate >
                    <DataTemplate >
                        <r:ItemContainer >
                            <r:DataRange  Name="AnswerList" Location="0%,60" Size="100%,20">
                                <r:DataRange.ItemTemplate>
                                    <DataTemplate>
                                        <r:ItemContainer>
                                            <r:Label Location="0%,0" Size="30%,20"  Background="{Binding QTitle}" BorderBrush="#ACE6EF"  BorderThickness="1,0,1,1" Padding="5,0,0,0" Text="[SID]" />
                                            <r:Label Location="30%,0" Size="30%,20"  Background="{Binding QTitle}" BorderBrush="#ACE6EF" BorderThickness="0,0,1,1" Padding="5,0,0,0" Text="[SName]"/>
                                            <r:Label Location="60%,0" Size="40%,20"  Background="{Binding QTitle}" BorderBrush="#ACE6EF" BorderThickness="0,0,1,1" Padding="5,0,0,0" Text="[SReply]"/>
                                        </r:ItemContainer>
                                    </DataTemplate>
                                </r:DataRange.ItemTemplate>
                            </r:DataRange>

                            <r:DataRange  Name="EliminationList" Location="0%,100" Size="100%,20" >
                                <r:DataRange.HeaderTemplate>
                                    <DataTemplate>
                                        <r:ItemContainer Size="100%,20">
                                            <!--EliminationList-->
                                            <r:Label  Location="0%,0" Size="100%,20" Background="#B8DAE3" BorderBrush="#ACE6EF" BorderThickness="1,0,0,0" Padding="5,0,0,0" Text="Elimination List" FontSize="14" />
                                        </r:ItemContainer>
                                    </DataTemplate>
                                </r:DataRange.HeaderTemplate>
                                <r:DataRange.ItemTemplate>
                                    <DataTemplate>
                                        <r:ItemContainer>
                                            <r:Label Location="0%,0" Size="100%,20" BorderBrush="#ACE6EF"  BorderThickness="1,1,1,0" Padding="5,0,0,0" Text="[SName]"/>
                                        </r:ItemContainer>
                                    </DataTemplate>
                                </r:DataRange.ItemTemplate>
                            </r:DataRange>
                        </r:ItemContainer>
                    </DataTemplate>
                </r:DataRange.ItemTemplate>
            </r:DataRange> 



I wanna to control "EliminationList" DataRange to show or hide.

thx..
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #7 - May 15th, 2013 at 10:44am
 
You can handle the QueryDetails event of the report, inspect the sender's name and if it is "EliminationList", do one of the following depending on whether you want to show or hide the range:

  • To hide the range, simply assign an empty IEnumerable (for example new object[] {}) to QueryDetailsEventArgs.Details. This will indicate that the range is empty.
  • To show the range, set Details to null and DataRange.Repeat to 1.

Let me know if this helps.

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #8 - May 16th, 2013 at 1:58am
 
Meppy wrote on May 15th, 2013 at 10:44am:
You can handle the QueryDetails event of the report, inspect the sender's name and if it is "EliminationList", do one of the following depending on whether you want to show or hide the range:

  • To hide the range, simply assign an empty IEnumerable (for example new object[] {}) to QueryDetailsEventArgs.Details. This will indicate that the range is empty.
  • To show the range, set Details to null and DataRange.Repeat to 1.

Let me know if this helps.

Regards,
Meppy


Yeah, it will hide the DataRange, but this will throw exception when exporting to PDF
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #9 - May 16th, 2013 at 8:38am
 
Hi,

I have sent you an e-mail with an updated version that should address this problem.

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #10 - May 17th, 2013 at 2:11am
 
Meppy wrote on May 16th, 2013 at 8:38am:
Hi,

I have sent you an e-mail with an updated version that should address this problem.

Regards,
Meppy


Hi,

Thanks for your great help, the problem is solved,
but there is still little problem, when the "EliminationList" DataRange is hidden, the area is still exist, like image below

The blank area can be removed?
 
 

2013-5-17_9-03-24.png (Attachment deleted)
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #11 - May 17th, 2013 at 10:40am
 
Hi,

You can try setting the height of the DataRange in question to 0 (that is, set Size to "W,0" where W is your current value for width). If the range has any content, it will be resized accordingly so that the content fits; if it is empty, it should take no space. However, the header of the data range (if any) will still be accounted for.

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #12 - May 20th, 2013 at 2:56am
 
Hi,

I set my "AnswerList" and "EliminationList" DataRange size's height to 0, but seem still the same effect.
 
 
 
IP Logged    
 
     

Meppy   Offline
YaBB Moderator
*****
Posts: 1783
Gender: male
MindFusion support


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #13 - May 20th, 2013 at 6:41am
 
Hi,

Can you please attach the full XAML of your report?

Regards,
Meppy
 
 
 
IP Logged    
 
     

luolishuang   Offline
YaBB Newbies
*
Posts: 40
I Love MindFusion!


   
     
 
Re: The empty DataRange can NOT be exported to PDF
Reply #14 - May 20th, 2013 at 7:59am
 
Meppy wrote on May 20th, 2013 at 6:41am:
Hi,

Can you please attach the full XAML of your report?

Regards,
Meppy


This is my full XAML report below,
thanks.

Code (HTML):
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:r="http://mindfusion.eu/reporting/wpf">

    <r:Report x:Key="EliminationReport" FontFamily="Arial" FontSize="12">
        <r:Page >
            <!-- Page Content-->
            <r:DataRange DataSource="{Binding QuestionTable}" Size="100%,100">
                <r:DataRange.ItemTemplate >
                    <DataTemplate >
                        <r:ItemContainer >

                            <!--Note Info-->
                            <r:Label Location="0,0" Size="100%,20" Background="#EAA41E" BorderBrush="#ACE6EF" BorderThickness="1,1,1,0" Text="(Note:__ means No Answer,_N means you got the chance to answer but did not answer in Rush Quiz Mode)" FontSize="14" />
                            <r:Label Location="0%,20" Size="100%,20" Background="#B8DAE3" Text="[QTitle]" BorderBrush="#ACE6EF" BorderThickness="1,1,1,0" FontSize="14"/>
                            <r:Label Location="0%,40" Size="30%,20" Background="#F8F488" BorderBrush="#ACE6EF"  BorderThickness="1,0,1,1" Padding="5,0,0,0" Text="Participant ID" FontSize="14" />
                            <r:Label Location="30%,40" Size="30%,20" Background="#F8F488" BorderBrush="#ACE6EF"  BorderThickness="0,0,1,1" Padding="5,0,0,0" Text="Full Name" FontSize="14" />
                            <r:Label Location="60%,40" Size="40%,20" Background="#F8F488" BorderBrush="#ACE6EF"  BorderThickness="0,0,1,1" Padding="5,0,0,0" Text="Response" FontSize="14" />

                            <r:DataRange  Name="AnswerList" Location="0%,60" Size="100%,0">
                                <r:DataRange.ItemTemplate>
                                    <DataTemplate>
                                        <r:ItemContainer>
                                            <r:Label Location="0%,0" Size="30%,20"  Background="{Binding QTitle}" BorderBrush="#ACE6EF"  BorderThickness="1,0,1,1" Padding="5,0,0,0" Text="[SID]" />
                                            <r:Label Location="30%,0" Size="30%,20"  Background="{Binding QTitle}" BorderBrush="#ACE6EF" BorderThickness="0,0,1,1" Padding="5,0,0,0" Text="[SName]"/>
                                            <r:Label Location="60%,0" Size="40%,20"  Background="{Binding QTitle}" BorderBrush="#ACE6EF" BorderThickness="0,0,1,1" Padding="5,0,0,0" Text="[SReply]"/>
                                        </r:ItemContainer>
                                    </DataTemplate>
                                </r:DataRange.ItemTemplate>
                            </r:DataRange>

                            <r:DataRange  Name="EliminationList" Size="100%,0" >
                                <r:DataRange.HeaderTemplate>
                                    <DataTemplate>
                                        <r:ItemContainer Size="100%,20">
                                            <!--EliminationList-->
                                            <r:Label  Location="0%,0" Size="100%,20" Background="#B8DAE3" BorderBrush="#ACE6EF" BorderThickness="1,0,0,0" Padding="5,0,0,0" Text="Elimination List" FontSize="14" />
                                        </r:ItemContainer>
                                    </DataTemplate>
                                </r:DataRange.HeaderTemplate>
                                <r:DataRange.ItemTemplate>
                                    <DataTemplate>
                                        <r:ItemContainer>
                                            <r:Label Location="0%,0" Size="100%,20" BorderBrush="#ACE6EF"  BorderThickness="1,1,1,0" Padding="5,0,0,0" Text="[SName]"/>
                                        </r:ItemContainer>
                                    </DataTemplate>
                                </r:DataRange.ItemTemplate>
                            </r:DataRange>
                        </r:ItemContainer>
                    </DataTemplate>
                </r:DataRange.ItemTemplate>
            </r:DataRange>

            <!-- Page Footer -->
            <r:Page.FooterTemplate>
                <DataTemplate>
                    <r:ItemContainer Size="100%,30">
                        <r:Label Size="100%,30" Text="[PageCurrent()]/[PageCount()]" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </r:ItemContainer>
                </DataTemplate>
            </r:Page.FooterTemplate>
        </r:Page>
    </r:Report>
</ResourceDictionary> 

 
 
 
IP Logged    
 
     
Pages: 1 2  Send Topic Print