Codejock Forums Homepage
Forum Home Forum Home > General > XAML Snippets
  New Posts New Posts RSS Feed - Report control with markup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report control with markup

 Post Reply Post Reply
Author
Message
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Topic: Report control with markup
    Posted: 20 July 2009 at 9:50am
Hi guys,

This my scenario,

I would like to use the report control to output to a printer the following format (e.g. print a receipt) which i push to a report control row. The tags are replaced with values from the database and additionally i add a watermarkbitmap to act as the logo. The problem is i cannot print more than one cheque/receipt per page since you can only load one bitmap on the RC per report and not per row. Currently i am using the standard format but i would like to apply markup so that i can also add styling to the text (e.g bold the titles) and probably add a logo that appears on every row. Has someone does this? anyhelp is really appreciated. TIA,.
                                                                 
VAT:  <VATNUMBER>          PIN: <PINNUMBER>

NAME:  <ADDRESS>                                                  <RECEIPTNO>    

                                                       
BEING PAYMENT OF
PAYMENT MODE:  <PAYMODE>


                             <CURRENCY>                                     <RATES>
      

     
                                                                          <AMOUNT>



<WORDS>


RECEIVED WITH THANKS           
                                                                       AUTHORISED SIGNATORY ____________________
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
braian87b View Drop Down
Groupie
Groupie


Joined: 01 April 2008
Location: Argentina
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote braian87b Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2009 at 2:26pm
ReportControl Is not must be used for this kind of things...
i recommend you to use a Report Renderer Control, like crystal reports or Active Reports... also, you can try to generate HTML code save to a file... and then print them using a third party control like webbrowser inet activex ( or something like that, from microsoft),

you only could print "tables" "recordsets" "grids" "rows-records" using print's method of RC... not "form like" designed data templates.


Product: Xtreme SuitePro (ActiveX) version 11.
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP 6
Spanish, Espaņol, English.
Argentina
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2009 at 3:39am
Thanks braian,

Av got my reasons why i wud like it particularly with the report control. For one,  codejock tools make my app pretty light compared to adding third party controls like CrystalReports. More so, i have built a report designer built around RC and thus i just wud like to enhance it by using the Markup that RC support.

I wud be glad to know if i can still implement the above using Markup.

regards,


Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2009 at 8:39pm
From Dr. Dobb's update:
great little comic entitled Misunderstanding Markup
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2012 at 10:00pm
This is what i'm doing, I hope it help:
 
1 - I use VS2010 to create the basic layout of each column of my report. I can create everything in a single cell or in several pieces.
 
2- I use "Codejock's MarkupPad" to verify the compatibility of  XAML  tags from VS.
 
3 - I change XAML code to add to my Tags :
 
Image Column :
 <Grid Height="100" HorizontalAlignment="Left"   Name="Grid1" VerticalAlignment="Top" Width="150">
     <Border Height="100" HorizontalAlignment="Left" Name="Border1" VerticalAlignment="Top" Width="150" Background="White" BorderBrush="#FF1FA3EB" BorderThickness="0,0,0,0">
         <Image Name="Image1" Stretch="Uniform" Width="140" Source="<<D04_032_M>>" Margin="2" Height="76" />
     </Border>
 </Grid>
 
Info Column :
 <Grid Height="100" HorizontalAlignment="Left"   Name="Grid1"   Width="550">
    
     <TextBlock Height="47" HorizontalAlignment="Left" Margin="399,5,0,0" Name="TextBlock6" Text="<<D03_002_C>>" TextWrapping="Wrap" VerticalAlignment="Top" Width="95" />
     <TextBlock Height="43" HorizontalAlignment="Left" Margin="399,60,0,0" Name="TextBlock4" Text="<<T21_002_C>>" TextWrapping="Wrap" VerticalAlignment="Top" Width="95" />
     <TextBlock Foreground="#FF1FA3EB"  HorizontalAlignment="Left" Height="20" Margin="5,5,0,0" Name="TextBlock2" Text="<<D04_008_C>>"   Width="384" />
     <TextBlock        HorizontalAlignment="Left" Height="20" Margin="5,60,0,0" Name="TextBlock1" Text="<<D04_001_C>>"  Width="290"   />
 </Grid>
 
4 - I set up the RC properties to work with XAML

.EnableMarkup = .T.

.PaintManager.FixedRowHeight = .F.
.PaintManager.HorizontalGridStyle = xtpGridSolid

Finnaly - I merge the Database Information with XAML. In my case I'm usign MS Visual Foxpro :
item(1).caption = TextMerge(Image Column )
item(2).caption = TextMerge(Info Column )
 
-----
 
 
wlcabral
Back to Top
vicos View Drop Down
Groupie
Groupie


Joined: 23 November 2009
Location: Romania
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote vicos Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2013 at 2:23pm
Can share your example please?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.