Saturday, 15 February 2014

sql - Printing a "tag" with a barcode using reporting services and DB values in asp.net -



sql - Printing a "tag" with a barcode using reporting services and DB values in asp.net -

edit 7 : made it! posted answer.

edit 6 : scrapped css , div , used reporting services. @ edits downwards post see @ right now.

i'm @ finish lost right now. sorry if not clear plenty question, can edit add together info if needed. i'll seek giving much info possible. i've searched on google hours , havn't find help me. trying create multiple "tag" using info on user have in database , putting them on page print them. plus, need 1 tag per page. got stored proc returns me username, name , family name id utilize generate barcode every users in event.

create procedure schema.getalltags @idevent int begin select mem.nom, mem.prenom, mem.pseudo, use.iduser schema.user utilize bring together schema.member mem on use.idmember = mem.idmember use.idevent = @idevent end

barcode generated calling asp page , giving id received stored proc in page parameter. asp page image utilize show barcode in other pages.

i tried making tags using divs, css, asp content , stuff , worked... except printing part. tag beingness resized time, margin not beingness inch tho tried create 25.4mm (1 inch) , on top of it, url of page showing in preview print. thoses problem solved client unchecking show url , setting margin in options. don't want forcefulness client theses in order prepare problem. want 3 2 in, 1 in margin , no url without having alter printing options.

i told using reporting services solve printing problems. have no clues how create need out of reporting services (i know reporting services mind you)... less on how barcode in there.

here tag should in end on print page. 3in x 2in 1in margin on top , left when printing.

here css used seek , print tag :

<style type="text/css"> @page { margin: 25.4mm 25.4mm 25.4mm 25.4mm; } @media print { body * { visibility:hidden; } #tagprint, #tagprint * { visibility:visible; } #tagprint { position:fixed; top: 0px; left: 0px; } #noprint { display:none; } }

and here asp (that page 1 tag showing) :

<asp:updatepanel id="updatepanel1" runat="server" > <contenttemplate> <div id="tag" class="formrow"> <div id="tagprint" style="border:1px solid;width:76.2mm;height:50.8mm"> <p style="text-align:center" /> <br /> <asp:label id="lblusertag" runat="server" style="font-weight:bold;font-size:18px" /> <br /> <asp:label id="lblfullnametag" runat="server" style="font-weight:bold;font-size:16px" /> <br /> <br /> <asp:image id="imgbarcodetag" runat="server" /> <br /> <asp:label id="lblidtag" runat="server" style="font-weight:bold;font-size:16px" /> </div> </div> </contenttemplate> </asp:updatepanel>

currently generating tags using repeater on page generate multiple tags , binding dataset.tables[0].rows repeater. allowing me create thoses tags.

is there ways without reporting services using javascript , css? doable reporting services (using asp page in reporting service create barcode)? since barcode come font, there other way adding font on compiter in order utilize in reporting services? (i don't want client have install font) making pdf of tag easier/better?

edit : started working around study service. right got study made 4 parameter. (username, total name, barcode url , id) i'll give update on happens next.

edit 2 : so... after managing create study service , showing in page. can't seem image show on report. , if did. don't know how create multiple page on study or how print it. decided seek making div tag in pdf instead , seek print way. i'll update tomorrow when chance seek it.

edit 3 : aside wanting nail head on wall several times, tried doing in pdf , it's not working. found out can done in flash, not want in flash. i'm study service. made study service grid send dataset grid , set datas in each fields. installed font able utilize in report. can't seem bind dataset report. tried sqldatasource , objectdatasource , nil seems work. started study in new project seek scrap. maybe current project playing against me. i'm give up. -_-

edit 4 : made working. got study on page working fine.

now thing have left do... manage study have multiple page.

edit 5 : rereading edits , realized forgot after edit 2, scrapped parameters stuff , used dataset instead. also, scrapped css , div utilize reporting service save pdf file of tags.

so allow me preface bit of explanation ssrs: you're doing wrong.

by mean, if you're trying embed asp code , output in ssrs accomplish graphical fidelity, it's not going happen.

the reason ssrs recommended because can take set of info , reproduce high graphic fidelity in variety of reporting styles, formats, , output methods.

but have build scratch. no html, no css, no asp, no .net (well .. sort of. you, yes, no .net required.)

whoa, whoa, whoa, going? it's not hard, promise.

so ... first, let's set task list in ssrs. before can that, let's build wizard-driven study can id tag info set report. it'll give basic sense how ssrs consumes info , turns report.

create brand-new reporting services project. add new study project. in solution explorer, right click on reports folder , "add new report." step 1 select info source. hook database stored procedure you're running, test connection, moving on. next step design query - you've done sproc, paste in - now, add together hardcoded value idevent. we'll prepare later. now take study type - let's tabular now. matrix more lots of row/column dynamics, , you're looking simple printable report, table you. now in designing table, add together of output columns detils group. choose old table style, you're throwing away in end. name study useful , finish.

now you've got rdl, it's got info source, info set, , code in designer area. can preview you've done far clicking "preview" tab in designer area. pretty sweet, there's data, in little rows in table. what?

now task list. start googling, can larn of this, won't take long, , when you're done, you'll have well-formatted set of id tags ready printer. , if run specific issues - well, that's site for, right?

create parameter pass in idevent stored procedure. insert dynamic external image row retrieves barcode asp page. (hint: read on using "expressions" in ssrs.) figure out how utilize page break options in ssrs print 1 tag per page. use properties window format each "row" of table tag. figure out whether export study pdf, or utilize mhtml version provided.

you might potentially want larn how embed ssrs study in .net application (how clients printing tags, anyway?) , of course of study there tons of little methods, properties, , aspects of ssrs out of scope particular task might worth @ to the lowest degree taking @ later projects.

good luck!

asp.net sql printing reporting-services barcode

No comments:

Post a Comment